import service from '@/utils/request'

// @Tags EmailINBOX
// @Summary 创建EmailINBOX
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.EmailINBOX true "创建EmailINBOX"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /emailINBOX/createEmailINBOX [post]
export const createEmailINBOX = (data) => {
  return service({
    url: '/emailINBOX/createEmailINBOX',
    method: 'post',
    data,
  })
}

// @Tags EmailINBOX
// @Summary 删除EmailINBOX
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.EmailINBOX true "删除EmailINBOX"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /emailINBOX/deleteEmailINBOX [delete]
export const deleteEmailINBOX = (data) => {
  return service({
    url: '/emailINBOX/deleteEmailINBOX',
    method: 'delete',
    data,
  })
}

// @Tags EmailINBOX
// @Summary 删除EmailINBOX
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除EmailINBOX"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /emailINBOX/deleteEmailINBOX [delete]
export const deleteEmailINBOXByIds = (data) => {
  return service({
    url: '/emailINBOX/deleteEmailINBOXByIds',
    method: 'delete',
    data,
  })
}

// @Tags EmailINBOX
// @Summary 更新EmailINBOX
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.EmailINBOX true "更新EmailINBOX"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /emailINBOX/updateEmailINBOX [put]
export const updateEmailINBOX = (data) => {
  return service({
    url: '/emailINBOX/updateEmailINBOX',
    method: 'put',
    data,
  })
}

// @Tags EmailINBOX
// @Summary 用id查询EmailINBOX
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.EmailINBOX true "用id查询EmailINBOX"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /emailINBOX/findEmailINBOX [get]
export const findEmailINBOX = (params) => {
  return service({
    url: '/emailINBOX/findEmailINBOX',
    method: 'get',
    params,
  })
}

// @Tags EmailINBOX
// @Summary 分页获取EmailINBOX列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取EmailINBOX列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /emailINBOX/getEmailINBOXList [get]
export const getEmailINBOXList = (params) => {
  return service({
    url: '/emailINBOX/getEmailINBOXList',
    method: 'get',
    params,
  })
}

export const getEmailIsSpam = (data) => {
  return service({
    baseURL: 'http://127.0.0.1:5001',
    url: '/result',
    method: 'post',
    data,
  })
}
